import HttpRequest from "@/lib/axios.js";

class ShopModel extends HttpRequest {
  constructor() {
    super();
  }
  /* 获取店铺详情 */
  getShopDetail({ shop_id }) {
    return this.req({
      url: "/shop/getShopDetail",
      method: "post",
      data: {
        shop_id
      }
    });
  }
  /* 获取动态圈列表 */
  getPostList({ pagesize = 999, city = "绍兴", shop_id }) {
    return this.req({
      url: "/post/getPostList",
      method: "post",
      data: {
        pagesize,
        city,
        shop_id
      }
    });
  }
  /* 获取礼券列表 */
  getCouponList({ pagesize = 999, city = "绍兴", lon = 1, lat = 1, shop_id }) {
    return this.req({
      url: "/coupon/getCouponList",
      method: "post",
      data: {
        pagesize,
        city,
        lon,
        lat,
        shop_id
      }
    });
  }
  /* 获取商品列表 */
  getGoodsList({ pagesize = 999, shop_id }) {
    return this.req({
      url: "/goods/getGoodsList",
      method: "post",
      data: {
        pagesize,
        shop_id
      }
    });
  }
}
export default ShopModel;
